var List = [
  {
    id: "01",
    label: " 自然资源",
    children: [
      {
        id:'0101',
        label: "水资源",
        children: [
          {
            id:'010101',
            label: "江河",
          },
          {
            id:'010102',
            label: "湖泊、水库等封闭水域",
          },
          {
            id:'010103',
            label: "地下水",
          },
        ],
      },
      {
        id:'0102',
        label: "土地资源",
      },
      {
        id:'0103',
        label: "森林资源",
        children: [
          {
            id:'010301',
            label: "天然林",
          },
          {
            id:'010302',
            label: "人工林",
          },
        ],
      },
      {
        id:'0104',
        label: "草原资源",
      },
      {
        id:'0105',
        label: "湿地资源",
      },
      {
        id:'0106',
        label: "矿山资源",
      },
      {
        id:'0107',
        label: "生物资源",
        children: [
          {
            id:'010701',
            label: "资源1",
          },
          {
            id:'010702',
            label: "资源1",
          },
        ],
      },
    ],
  },
  {
    id:'02',
    label: " 环境监测",
    children: [
      {
        id:'0201',
        label: "水资源",
        children: [
          {
            id:'020101',
            label: "江河",
          },
          {
            id:'020102',
            label: "湖泊、水库等封闭水域",
          },
          {
            id:'020103',
            label: "地下水",
          },
        ],
      },

      {
        id:'0202',
        label: "大气环境",
        children: [
          {
            id:'020201',
            label: "天然林",
          },
          {
            id:'020202',
            label: "人工林",
          },
        ],
      },
      {
        id:'0203',
        label: "土壤环境",
        children: [
          {
            id:'020301',
            label: "资源1",
          },
          {
            id:'020302',
            label: "资源1",
          },
        ],
      },
      {
        id:'0204',
        label: "固体废物",
        children: [
          {
            id:'020401',
            label: "资源1",
          },
          {
            id:'020402',
            label: "资源1",
          },
        ],
      },
      {
        id:'0205',
        label: "环境报告",
        children: [
          {
            id:'020501',
            label: "资源1",
          },
          {
            id:'020502',
            label: "资源1",
          },
        ],
      },
    ],
  },
];
var data=[];
import Mock from "mockjs";
for (var i = 0; i < 20; i++) {
    data.push({
    id: '01'+'0'+ i,
    name: Mock.mock("@cname()"),
    address: Mock.mock('@csentence(3, 5)'),
    themes: Mock.mock("@datetime"),
    type: Math.random()>0 ?'库表': '文件', // 0充值 1优惠券 2理财服务 3购物一定盈
    time: Mock.mock('@date()'),
  });
}
// data: [
//     { id: '01', name: "长江流域水土流失总面积", themes: '自然资源', type: '库表', time: '2022-12-30' },
//     { id: '02', name: "长江流域水土流失总面积", themes: '自然资源', type: '库表', time: '2022-12-30' },
//     { id: '03', name: "长江流域水土流失总面积", themes: '自然资源', type: '库表', time: '2022-12-30' },
//     { id: '04', name: "长江流域水土流失总面积", themes: '自然资源', type: '库表', time: '2022-12-30' },
//     { id: '05', name: "长江流域水土流失总面积", themes: '自然资源', type: '库表', time: '2022-12-30' },
//     { id: '06', name: "长江流域水土流失总面积", themes: '自然资源', type: '库表', time: '2022-12-30' },
// ]




import { param2Obj } from '../utls/utilsDemo'
export default {
    MenuData: (config) => {
        console.log(config);
        var { keyword } =param2Obj(config.url)
       var newARr = List
    //    var newARr = List.filter(item=>item.date.indexOf(keyword)!=-1)
        return {
            code: 200,
            msg: '请求成功',
            data: newARr
        }
    },
    Listdata: (config) => {
        console.log(config);
        var { keyword } =param2Obj(config.url)
       var newARr = data
    //    var newARr = List.filter(item=>item.date.indexOf(keyword)!=-1)
        return {
            code: 200,
            msg: '请求成功',
            data: newARr
        }
    }
}


